package com.kingyun.gpsinspection.purificationservice.services.tdm.innerservice.impl;

import com.kingyun.gpsinspection.purificationservice.dao.mapper.tdm.ProblemAssignHistoryMapper;
import com.kingyun.gpsinspection.purificationservice.facade.model.tdm.ProblemAssignHistory;
import com.kingyun.gpsinspection.purificationservice.facade.model.tdm.ProblemAssignHistoryVo;
import com.kingyun.gpsinspection.purificationservice.facade.service.tdm.ProblemAssignHistoryService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 问题指派人历史记录业务层
 * Created by sugongche on 2017/2/22.
 */
public class ProblemAssignHistoryServiceImpl implements ProblemAssignHistoryService {
    @Autowired
    private ProblemAssignHistoryMapper problemAssignHistoryMapper;
    /**
     * bootstrap-table数据构造
     * @return
     */
    @Override
    public Map<String, Object> listMap(ProblemAssignHistory problemAssignHistory) throws Exception {
        Map<String, Object> map = new HashMap<>();
        List<ProblemAssignHistoryVo> problemAssignHistoryList = problemAssignHistoryMapper.queryList(problemAssignHistory);
        int total = problemAssignHistoryMapper.queryCount(problemAssignHistory);
        map.put("rows", problemAssignHistoryList);
        map.put("total",total);
        return map;
    }
}
